package ltd.hyangyang.rpc.server.service.impl;

import ltd.hyangyang.rpc.core.anno.EnableAutoRegistry;
import ltd.hyangyang.rpc.entity.ClientMessage;
import ltd.hyangyang.rpc.entity.ServerMessage;
import ltd.hyangyang.rpc.server.service.MessageService;

import java.util.logging.Logger;


@EnableAutoRegistry(group = "impl1")
public class MessageServiceImpl implements MessageService {

    Logger logger = Logger.getGlobal();

    @Override
    public ServerMessage getMessage(ClientMessage clientMessage) {
        ServerMessage serverMessage = new ServerMessage(1, "hello,world");

        logger.info(serverMessage.toString());
        return serverMessage;
    }
}
